﻿@model AgentExchangeModel
@using Urs.Admin.Models.Agents
<div class="layui-card">
    <div class="layui-card-body">
        <div class="layui-form" lay-filter="layuiadmin-form-exchange" id="layuiadmin-form-exchange" style="padding: 20px 30px 0 0;">
            <input asp-for="Id" type="hidden" />
            <div class="layui-form-item">
                <label class="layui-form-label">转账状态</label>
                <div class="layui-form-mid layui-word-aux">
                    @(Model.IsTransfer ? "已转账-时间:" + Model.TransferTime.Value.ToString("yyyy-MM-dd HH:mm") : "待转账")
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">提现金额</label>
                <div class="layui-input-block">
                    <u-editor asp-for="ExchangFee" />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">真实姓名</label>
                <div class="layui-input-block">
                    <u-editor asp-for="Name" />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">微信号</label>
                <div class="layui-input-block">
                    <u-editor asp-for="WeixinAccount" />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">备注</label>
                <div class="layui-input-block">
                    <u-textarea asp-for="Remark" />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">微信流水号</label>
                <div class="layui-input-block">
                    <div class="layui-form-mid layui-word-aux">
                        @Html.Raw(Model.SerialNumber)
                    </div>
                </div>
            </div>
            <div class="layui-form-item layui-hide">
                <input type="button" lay-submit lay-filter="set_system_submit_btn" id="set_system_submit_btn" value="提交">
            </div>
        </div>
    </div>
</div>
<script>
    layui.use(['index', 'form'], function () {
        var $ = layui.$
            , form = layui.form;

        //监听提交
        form.on('submit(set_system_submit_btn)', function (data) {
            var field = data.field; //获取提交的字段
            var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引

            //提交 Ajax 成功后，关闭当前弹层并重载表格
            $.post('@Url.Action("ExchangeEdit")', field, function(rep) {
                parent.layui.table.reload('LAY-category-list'); //重载表格
                parent.layer.close(index); //再执行关闭
            });
        });
    })
</script>
